import 'package:flutter/material.dart';

class MyApp7 extends StatelessWidget {
  const MyApp7({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Text组件'),
        centerTitle: true,
        backgroundColor: Colors.amber,
      ),
      body: Center(
        child: Container(
          width: 300,
          height: 400,
          color: Colors.cyan,
          // 加载网络图片
          // child: Image.network(
          //   'https://yanxuan-item.nosdn.127.net/e529b6ab111ade9da9314867f98d360f.png',
          //   fit: BoxFit.contain,
          //   width: 200,
          // ),

          // 加载本地图片资源
          child: Image.asset('qiche.png'),
        ),
      ),
    );
  }
}
